package com.douhao.personal.mapper;

import com.douhao.personal.model.Permission;
import com.douhao.personal.model.RolePermission;
import com.douhao.personal.model.RolePermissionBo;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface PermissionMapper {

    //根据用户ID获取权限的Set集合
    Set<String> findPermissionByUserId(String id);

    int deleteByPrimaryKey(Long id);

    List<Permission> list(Map<String, Object> map);

    long count(Map<String, Object> map);

    int insert(Permission permission);

    List<RolePermissionBo> findRoleAndPermission(Map<String,Object> map);

    long roleAndPermissionCount(Map<String,Object> map);

    List<RolePermissionBo> selectPermissionByRoleId(String id);

    void deleteByRoleId(String roleId);

    int insertSelective(RolePermission entity);
}


